home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 21
/
Cream of the Crop 21 (Terry Blount) (October 1996).iso
/
windows
/
winxs16.zip
/
DIFF-E.SED
< prev
next >
Wrap
Text File
|
1995-11-27
|
633b
|
59 lines
#n
# script to simulate the diff -e command, whereby
# WinXs diff ouput is converted to a sed script.
# When applied to file1, this script will produce
# file2.
# delete lines referring to file1
:begin
/^----/d
/^< /d
# pass through blank lines
/^$/{
p
d
}
# convert sequences from file2
/^> /{
s/^> //
x
:loop
n
s/^> //
t repeat
x
p
x
b begin
:repeat
x
s/$/\\/
p
b loop
}
# convert command lines
/a/{
s/a.*$/a\\/
s/^0a/1i/
p
d
}
/c/{
s/c.*$/c\\/p
d
}
/d/{
s/d.*$/d/p
d
}